package com.lvwenguo.activemq;

import org.apache.activemq.broker.region.Destination;
import org.apache.activemq.command.ActiveMQQueue;
import org.apache.activemq.command.ActiveMQTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jms.annotation.EnableJms;

import javax.jms.Topic;


/**
 * @Author lvwenguo
 * @Date 2021/3/27 9:35
 * @Version 1.0
 */
@Configuration
@EnableJms
public class MyTopic {

    //定义存放消息
    @Bean
    public Topic queue() {
        return new ActiveMQTopic("news.topic");
    }
}